﻿
namespace Marmat.Forms.Views
{
    namespace DataGrid
    {
        public class DataColumnChangeEventArgs
        {

            /* TODO ERROR: Skipped RegionDirectiveTrivia */
            private Forms.DataGrid _GridControl;
            internal System.Data.DataColumnChangeEventArgs info;
            /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
            /* TODO ERROR: Skipped RegionDirectiveTrivia */
            internal DataColumnChangeEventArgs(Forms.DataGrid BGrid, System.Data.DataColumnChangeEventArgs info)
            {
                this._GridControl = BGrid;
                this.info = info;
            }
            /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
            /* TODO ERROR: Skipped RegionDirectiveTrivia */
            public Forms.DataGrid GridControl
            {
                get
                {
                    return this._GridControl;
                }
            }

            public Row Row
            {
                get
                {
                    return new Row(this.GridControl, this.info.Row);
                }
            }

            public Column Column
            {
                get
                {
                    return this.GridControl.Columns[this.info.Column.ColumnName];
                }
            }

            public object NewValue
            {
                get
                {
                    return this.info.ProposedValue;
                }

                set
                {
                    this.info.ProposedValue = value;
                }
            }

            public object OldValue
            {
                get
                {
                    return this.Row[this.Column.Name];
                }
            }

            public bool Cancel
            {
                get
                {
                    return this.m_Cancel;
                }

                set
                {
                    this.m_Cancel = value;
                }
            }

            internal bool m_Cancel = false;
            /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        }
    }
}